package br.ucb.sigplan.action.impl;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.ucb.sigplan.action.Action;
import br.ucb.sigplan.beans.Conteudo;
import br.ucb.sigplan.crud.ConteudoCrud;

public class AbrirAlteraConteudo implements Action {

	@Override
	public String execute(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		Integer idConteudo = new Integer(req.getParameter("idConteudo"));
		Conteudo conteudo = ConteudoCrud.findById(idConteudo);
		req.setAttribute("conteudo", conteudo);
		return "/jsp/diretor/conteudo/dirAlteraConteudo.jsp";
	}

}
